<?php

include_once "funct.php";

if (!isset($_POST["id"], $_POST["valoare"]))
	iesire();

clean($_POST["id"]);
clean($_POST["valoare"]);

if ($_POST["id"] == "nume" && strlen($_POST["valoare"])>4) {
	$rezultat = mysql_query("select * from " . $db["users"] . " where name='" . $_POST["valoare"] . "'");
	if(mysql_num_rows($rezultat)==0) echo "0";
	else echo "1";
}
else
	echo "0";
?>
